﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace Stonecode.Solar.ParticleEngine.SettingsTemplate
{
    /// <summary>
    /// Do not use. This is an old template
    /// </summary>
    [Obsolete()]
    public static class DisintegrateSettings
    {
        public static uint MaxParticles = 1000;

        public static string TextureName = "LensFlare";

        public static TimeSpan Duration = TimeSpan.FromSeconds(1);

        public static float MinHorizontalVelocity = -10;
        public static float MaxHorizontalVelocity = 10;

        public static float MinVerticalVelocity = 0;
        public static float MaxVerticalVelocity = 0;

        // Create a wind effect by tilting the gravity vector sideways.
        public static Vector3 Gravity = new Vector3(0, -100, 0);

        public static float EndVelocity = 0f;

        public static float MinRotateSpeed = -1;
        public static float MaxRotateSpeed = 1;

        public static float MinStartSize = 1;
        public static float MaxStartSize = 3;

        public static float MinEndSize = 1;
        public static float MaxEndSize = 3;
        public static Color MaxColor = Color.LightBlue;
        public static Color MinColor = Color.Cyan;

        public static void CreateSettings(out EmitterSettings pSettings)
        {
            pSettings = new EmitterSettings(MaxParticles);
            pSettings.TextureName = TextureName;

            pSettings.Duration = Duration;

            pSettings.MinHorizontalVelocity = MinHorizontalVelocity;
            pSettings.MaxHorizontalVelocity = MaxHorizontalVelocity;

            pSettings.MinVerticalVelocity = MinVerticalVelocity;
            pSettings.MaxVerticalVelocity = MaxVerticalVelocity;


            pSettings.Gravity = Gravity;

            pSettings.EndVelocity = EndVelocity;

            pSettings.MinRotateSpeed = MinRotateSpeed;
            pSettings.MaxRotateSpeed = MaxRotateSpeed;

            pSettings.MinStartSize = MinStartSize;
            pSettings.MaxStartSize = MaxStartSize;

            pSettings.MinEndSize = MinEndSize;
            pSettings.MaxEndSize = MaxEndSize;
            pSettings.MaxColor = MaxColor;
            pSettings.MinColor = MinColor;
        }
    }
}
